using Game.Core;
using Game.Main.Model;
using Game.Main.View;

namespace Game.Component
{
	public class AmbulanceLampItem : BaseItem
	{
		private AmbulanceContainerItem ambulance;

		public override void Init(ItemArchiveData data)
		{
			base.Init(data);
		}

		public override void QuicklyTouch(TouchEventData touchEventData)
		{
			base.QuicklyTouch(touchEventData);
			if (ambulance == null)
			{
				BaseItem itemByScriptType = Singleton<Scene>.Instance.GetItemByScriptType(154);
				if (itemByScriptType != null)
				{
					ambulance = (AmbulanceContainerItem)itemByScriptType;
				}
			}
			if (ambulance != null)
			{
				ambulance.ChangeLampState();
			}
		}
	}
}
